package com.spfood.web;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ldubbo.sinterface.distribution.DistributionService;

@Controller
@RequestMapping(value = "webDemo")
public class WebDemoController {

	@RequestMapping(value = "print", method=RequestMethod.GET)
	@ResponseBody
	public Map<String, Object> print() {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("success", true);
		data.put("username", "张三");
		return data;
	}
	
	@Autowired
	DistributionService distributionService;
	
	@RequestMapping(value = "getUserInfo", method=RequestMethod.GET)
	@ResponseBody
	public String getUserInfo() {
		return distributionService.getUserInfo("lixl");
	}

}
